package com.gaohe.hotal.service.impl;

import java.util.List;
import com.gaohe.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.hotal.mapper.HotEmployeePerformanceMapper;
import com.gaohe.hotal.domain.HotEmployeePerformance;
import com.gaohe.hotal.service.IHotEmployeePerformanceService;

/**
 * 员工月绩效Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-02
 */
@Service
public class HotEmployeePerformanceServiceImpl implements IHotEmployeePerformanceService 
{
    @Autowired
    private HotEmployeePerformanceMapper hotEmployeePerformanceMapper;

    /**
     * 查询员工月绩效
     * 
     * @param performanceId 员工月绩效主键
     * @return 员工月绩效
     */
    @Override
    public HotEmployeePerformance selectHotEmployeePerformanceByPerformanceId(Long performanceId)
    {
        return hotEmployeePerformanceMapper.selectHotEmployeePerformanceByPerformanceId(performanceId);
    }

    /**
     * 查询员工月绩效列表
     * 
     * @param hotEmployeePerformance 员工月绩效
     * @return 员工月绩效
     */
    @Override
    public List<HotEmployeePerformance> selectHotEmployeePerformanceList(HotEmployeePerformance hotEmployeePerformance)
    {
        return hotEmployeePerformanceMapper.selectHotEmployeePerformanceList(hotEmployeePerformance);
    }

    /**
     * 新增员工月绩效
     * 
     * @param hotEmployeePerformance 员工月绩效
     * @return 结果
     */
    @Override
    public int insertHotEmployeePerformance(HotEmployeePerformance hotEmployeePerformance)
    {
        hotEmployeePerformance.setCreateTime(DateUtils.getNowDate());
        return hotEmployeePerformanceMapper.insertHotEmployeePerformance(hotEmployeePerformance);
    }

    /**
     * 修改员工月绩效
     * 
     * @param hotEmployeePerformance 员工月绩效
     * @return 结果
     */
    @Override
    public int updateHotEmployeePerformance(HotEmployeePerformance hotEmployeePerformance)
    {
        hotEmployeePerformance.setUpdateTime(DateUtils.getNowDate());
        return hotEmployeePerformanceMapper.updateHotEmployeePerformance(hotEmployeePerformance);
    }

    /**
     * 批量删除员工月绩效
     * 
     * @param performanceIds 需要删除的员工月绩效主键
     * @return 结果
     */
    @Override
    public int deleteHotEmployeePerformanceByPerformanceIds(Long[] performanceIds)
    {
        return hotEmployeePerformanceMapper.deleteHotEmployeePerformanceByPerformanceIds(performanceIds);
    }

    /**
     * 删除员工月绩效信息
     * 
     * @param performanceId 员工月绩效主键
     * @return 结果
     */
    @Override
    public int deleteHotEmployeePerformanceByPerformanceId(Long performanceId)
    {
        return hotEmployeePerformanceMapper.deleteHotEmployeePerformanceByPerformanceId(performanceId);
    }
}
